import requests
res = requests.get("https://api.zzzmh.cn/v2/bz/v3/getUrl/16e97308c2e942a28c68afb22a36023b21",allow_redirects=False)
if res.status_code == 302:
    location = res.headers['Location']
    print(location)
    img_res = requests.get(location)
    with open("极简壁纸.jpg",'wb') as f:
        f.write(img_res.content)


